#include <iostream>

using namespace std;

void jc(int a, int b, int c);

int main(void)
{
	int a, b, c;
	cout << "a = ";
	cin >> a;
	cout << "b = ";
	cin >> b;
	cout << "c = ";
	cin >> c;

	jc(a, b, c);

	return 0;
}

void jc(int a, int b, int c)
{
	int i, j;
	int one[a][b];
	int two[b][c];
	int three[a][c];
	int k;

	for(i = 0; i < a; i ++)
	{
		for(j = 0; j < b; j ++)
		{
			cout << "one[" << i << "][" << j << "]= ";
			cin >> one[i][j];	
		}
	}
	for(i = 0; i < b; i ++)
        {
                for(j = 0; j < c; j ++)
                {
                        cout << "two[" << i << "][" << j << "]= ";
                        cin >> two[i][j];
                }
        }
	for(i = 0; i < a; i ++)
        {
                for(j = 0; j < c; j ++)
                {
                        cout << "three[" << i << "][" << j << "]= ";
			three[i][j] = 0;
			for(k = 0; k < b; k ++)
			{
				three[i][j] += one[i][k] * two[k][j]; 
			}
			cout << three[i][j] << endl;
                }
        }

	for(i = 0; i < a; i ++)
	{
		for(j = 0; j < c; j ++)
		{
			cout << three[i][j] << " ";
		}
		cout << endl;
	}	
}
